import request from "@/utils/request";

// 查询订单列表
export function listOrder(query) {
  return request({
    url: "/pc/payRecord/pageList",
    method: "get",
    params: query,
  });
}

// 查询订单详细
export function getOrder(id) {
  return request({
    url: "/pc/payRecord/info?id=" + id,
    method: "get",
  });
}

// 订单退款
export function refundOrder(id) {
  return request({
    url: "/pc/payRecord/refund",
    method: "get",
    params: {
      id: id,
    },
  });
}

// 新增订单
export function addOrder(data) {
  return request({
    url: "/pc/order/addOrUpdate",
    method: "post",
    data: data,
  });
}

// 修改订单
export function updateOrder(data) {
  return request({
    url: "/pc/order/addOrUpdate",
    method: "post",
    data: data,
  });
}

// 删除订单
export function delOrder(id) {
  return request({
    url: "/pc/order/delete/" + id,
    method: "delete",
  });
}

// 获取所有圈子
export function getCircleList() {
  return request({
    url: "/pc/circle/findByNameList",
    method: "get",
  });
}
